home *** CD-ROM | disk | FTP | other *** search
- // MainFrm.h : interface of the CMainFrame class
- //
- /////////////////////////////////////////////////////////////////////////////
-
- #if !defined(AFX_MAINFRM_H__1AE2E5CC_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
- #define AFX_MAINFRM_H__1AE2E5CC_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
-
- // Why must I put this here, god why?
- #include "GnucleusDoc.h"
-
- class CMainFrame : public CMDIFrameWnd
- {
- DECLARE_DYNAMIC(CMainFrame)
- public:
- CMainFrame();
-
- // Attributes
- public:
- UINT UpdateTimer;
-
- // Operations
- public:
- CDialogBar* GetDialogBar();
- BOOL ShowTaskBarButton(BOOL bVisible);
-
- BOOL Enabled() { return m_bEnabled; }
- BOOL Visible() { return !m_bHidden; }
-
- // Create the tray icon
- CreateTrayIcon(CWnd* pParent, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
-
- // Change or retrieve the Tooltip text
- BOOL SetTooltipText(LPCTSTR pszTooltipText);
- BOOL SetTooltipText(UINT nID);
- CString GetTooltipText() const;
-
- // Change or retrieve the icon displayed
- BOOL SetIcon(HICON hIcon);
- BOOL SetIcon(LPCTSTR lpszIconName);
- BOOL SetIcon(UINT nIDResource);
- BOOL SetStandardIcon(LPCTSTR lpIconName);
- BOOL SetStandardIcon(UINT nIDResource);
- HICON GetIcon() const;
- void HideIcon();
- void ShowIcon();
- void RemoveIcon();
- void MoveToRight();
-
- // Change menu default item
- void GetMenuDefaultItem(UINT& uItem, BOOL& bByPos);
- BOOL SetMenuDefaultItem(UINT uItem, BOOL bByPos);
-
- // Change or retrieve the window to send notification messages to
- BOOL SetNotificationWnd(CWnd* pNotifyWnd);
- CWnd* GetNotificationWnd() const;
-
- // Default handler for tray notification message
- virtual LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMainFrame)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- protected:
- virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
- virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
- //}}AFX_VIRTUAL
-
- // Implementation
- public:
- virtual ~CMainFrame();
-
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- protected: // control bar embedded members
- CStatusBar m_wndStatusBar;
- CToolBar m_wndToolBar;
- CReBar m_wndReBar;
- CDialogBar m_wndDlgBar;
-
- DWORD GetEstSpeed(DWORD);
-
- CGnucleusDoc *Doc;
- UINT Strike;
- BOOL m_bOwnerCreated;
- CDialog m_MainFrameOwner;
- BOOL m_bUseTrayIcon;
-
- // Tray Icon Implementation
- CWnd m_wndTrayIcon;
- void InitializeTrayIcon();
- BOOL m_bEnabled; // does O/S support tray icon?
- BOOL m_bHidden; // Has the icon been hidden?
- NOTIFYICONDATA m_tnd;
-
- HICON m_IconList;
- static UINT m_nIDEvent;
- int m_nCurrentIcon;
- HICON m_hSavedIcon;
- UINT m_DefaultMenuItemID;
- BOOL m_DefaultMenuItemByPos;
-
- //
- // These functions draw the modified title bar.
- //
- void CalcCaptionRect( HWND hWnd, RECT& Rect );
- void DrawIconize( HDC hDc, int x, int y, int off );
- void DrawButtons( HWND hWnd );
- BOOL m_LBtnDown;
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CMainFrame)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnOpenFromTray();
- afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
- afx_msg BOOL OnNcActivate(BOOL bActive);
- afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
- afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
- afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
- afx_msg void OnNcPaint();
- afx_msg void OnPaint();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
-
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
- #endif // !defined(AFX_MAINFRM_H__1AE2E5CC_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
-